package com.ccp.dev.workflow.model;

import com.ccp.dev.core.basic.model.BaseModel;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

import java.io.Serializable;
import java.util.Date;

/**
 * ClassDescribe: 用户信息
 * Author :fanruiqi
 * Date: 2019-09-02
 * Since:1
 */
public class BpmPerformance extends BaseModel<BpmPerformance> {
    // id
    protected String id;
    // ACT 流程定义id
    protected String procDefId;
    // 流程定义id
    protected String modelId;
    // 流程标题
    protected String subject;
    // ACT 流程实例id
    protected String procInstId;
    // 流程实例标题
    protected String instSubject;
    // ACT流程任务节点id
    protected String taskId;
    // 流程任务节点Id
    protected String nodeId;
    // 流程任务节点名称
    protected String nodeName;
    // 任务创建时间
    protected Date createTime;
    // 初次读取任务时间
    protected Date readTime;
    // 任务完成时间
    protected Date endTime;
    // 创建到读取的持续时间（单位：秒）
    protected Long crDuration;
    // 读取到完成的持续时间（单位：秒）
    protected Long reDuration;
    // 创建到完成的持续时间（单位：秒）
    protected Long ceDuration;
    // 任务执行人Id
    protected String opeUserId;
    // 任务执行人名称
    protected String opeUserName;
    // 任务执行角色ID
    protected String opeRoleId;
    // 任务执行角色名称
    protected String opeRoleName;
    // 任务执行组织Id
    protected String opeOrgId;
    // 任务执行组织名称
    protected String opeOrgName;
    /**
     * 操作类型
     * 0=弃权， 1=同意
     * 2=反对， 3=驳回
     * 4=追回
     * 5=会签通过
     * 6=会签不通过
     */
    protected Integer opeType;
    //操作名称
    protected String opeName;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getProcDefId() {
        return procDefId;
    }

    public void setProcDefId(String procDefId) {
        this.procDefId = procDefId;
    }

    public String getModefId() {
        return modelId;
    }

    public void setModefId(String modelId) {
        this.modelId = modelId;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public String getProcInstId() {
        return procInstId;
    }

    public void setProcInstId(String procInstId) {
        this.procInstId = procInstId;
    }

    public String getInstSubject() {
        return instSubject;
    }

    public void setInstSubject(String instSubject) {
        this.instSubject = instSubject;
    }

    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    public String getNodeId() {
        return nodeId;
    }

    public void setNodeId(String nodeId) {
        this.nodeId = nodeId;
    }

    public String getNodeName() {
        return nodeName;
    }

    public void setNodeName(String nodeName) {
        this.nodeName = nodeName;
    }

    @Override
    public Date getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getReadTime() {
        return readTime;
    }

    public void setReadTime(Date readTime) {
        this.readTime = readTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Long getCrDuration() {
        return crDuration;
    }

    public void setCrDuration(Long crDuration) {
        this.crDuration = crDuration;
    }

    public Long getReDuration() {
        return reDuration;
    }

    public void setReDuration(Long reDuration) {
        this.reDuration = reDuration;
    }

    public Long getCeDuration() {
        return ceDuration;
    }

    public void setCeDuration(Long ceDuration) {
        this.ceDuration = ceDuration;
    }

    public String getOpeUserId() {
        return opeUserId;
    }

    public void setOpeUserId(String opeUserId) {
        this.opeUserId = opeUserId;
    }

    public String getOpeUserName() {
        return opeUserName;
    }

    public void setOpeUserName(String opeUserName) {
        this.opeUserName = opeUserName;
    }

    public String getOpeRoleId() {
        return opeRoleId;
    }

    public void setOpeRoleId(String opeRoleId) {
        this.opeRoleId = opeRoleId;
    }

    public String getOpeRoleName() {
        return opeRoleName;
    }

    public void setOpeRoleName(String opeRoleName) {
        this.opeRoleName = opeRoleName;
    }

    public String getOpeOrgId() {
        return opeOrgId;
    }

    public void setOpeOrgId(String opeOrgId) {
        this.opeOrgId = opeOrgId;
    }

    public String getOpeOrgName() {
        return opeOrgName;
    }

    public void setOpeOrgName(String opeOrgName) {
        this.opeOrgName = opeOrgName;
    }

    public Integer getOpeType() {
        return opeType;
    }

    public void setOpeType(Integer opeType) {
        this.opeType = opeType;
    }
    public String getOpeName() {
        return opeName;
    }

    public void setOpeName(String opeName) {
        this.opeName = opeName;
    }

    @Override
    public boolean equals(Object object)
    {
        if (!(object instanceof BpmPerformance))
        {
            return false;
        }
        BpmPerformance rhs = (BpmPerformance) object;
        return new EqualsBuilder()
                .append(this.id, rhs.id)
                .append(this.procDefId, rhs.procDefId)
                .append(this.modelId, rhs.modelId)
                .append(this.subject, rhs.subject)
                .append(this.procInstId, rhs.procInstId)
                .append(this.instSubject, rhs.instSubject)
                .append(this.taskId, rhs.taskId)
                .append(this.nodeId, rhs.nodeId)
                .append(this.nodeName, rhs.nodeName)
                .append(this.createTime, rhs.createTime)
                .append(this.readTime, rhs.readTime)
                .append(this.endTime, rhs.endTime)
                .append(this.crDuration, rhs.crDuration)
                .append(this.reDuration, rhs.reDuration)
                .append(this.ceDuration, rhs.ceDuration)
                .append(this.opeUserId, rhs.opeUserId)
                .append(this.opeUserName, rhs.opeUserName)
                .append(this.opeRoleId, rhs.opeRoleId)
                .append(this.opeRoleName, rhs.opeRoleName)
                .append(this.opeOrgId, rhs.opeOrgId)
                .append(this.opeOrgName, rhs.opeOrgName)
                .append(this.opeType, rhs.opeType)
                .append(this.opeName,rhs.opeName)
                .isEquals();
    }

    /**
     * @see Object#hashCode()
     */
    @Override
    public int hashCode()
    {
        return new HashCodeBuilder(-82280557, -700257973)
                .append(this.id)
                .append(this.procDefId)
                .append(this.modelId)
                .append(this.subject)
                .append(this.procInstId)
                .append(this.instSubject)
                .append(this.taskId)
                .append(this.nodeId)
                .append(this.nodeName)
                .append(this.createTime)
                .append(this.readTime)
                .append(this.endTime)
                .append(this.crDuration)
                .append(this.reDuration)
                .append(this.ceDuration)
                .append(this.opeUserId)
                .append(this.opeUserName)
                .append(this.opeRoleId)
                .append(this.opeRoleName)
                .append(this.opeOrgId)
                .append(this.opeOrgName)
                .append(this.opeType)
                .append(this.opeName)
                .toHashCode();
    }

    /**
     * @see Object#toString()
     */
    @Override
    public String toString()
    {
        return new ToStringBuilder(this)
                .append("id",this.id)
                .append("procDefId", this.procDefId)
                .append("defId", this.modelId)
                .append("subject", this.subject)
                .append("procInstId", this.procInstId)
                .append("instSubject", this.instSubject)
                .append("taskId", this.taskId)
                .append("nodeId", this.nodeId)
                .append("nodeName", this.nodeName)
                .append("createTime", this.createTime)
                .append("readTime", this.readTime)
                .append("endTime", this.endTime)
                .append("crDuration", this.crDuration)
                .append("reDuration", this.reDuration)
                .append("ceDuration", this.ceDuration)
                .append("opeUserId", this.opeUserId)
                .append("opeUserName", this.opeUserName)
                .append("opeRoleId", this.opeRoleId)
                .append("opeRoleName", this.opeRoleName)
                .append("opeOrgId", this.opeOrgId)
                .append("opeOrgName", this.opeOrgName)
                .append("opeType", this.opeType)
                .append("opeName", this.opeName)
                .toString();
    }

}
